#ifndef UNITTEST_H_JM_20130111
#define UNITTEST_H_JM_20130111

#include <functional>
#include <cassert>

namespace jmlib {

	typedef std::function<void (void)> UnitTestFunction;

	class  UnitTest {
	public:
		struct NoTestException {};

		virtual ~UnitTest() { }


		void runTest() {
			try {
				test01();test02();test03();test04();test05();test06();test07();
				test08();test09();test10();test11();test12();test13();test14();
				test15();test16();test17();test18();test19();test20();test21();
			}
			catch (const NoTestException&) { }
		}

		virtual void test01() { throw NoTestException(); }
		virtual void test02() { throw NoTestException(); }
		virtual void test03() { throw NoTestException(); }
		virtual void test04() { throw NoTestException(); }
		virtual void test05() { throw NoTestException(); }
		virtual void test06() { throw NoTestException(); }
		virtual void test07() { throw NoTestException(); }
		virtual void test08() { throw NoTestException(); }
		virtual void test09() { throw NoTestException(); }
		virtual void test10() { throw NoTestException(); }
		virtual void test11() { throw NoTestException(); }
		virtual void test12() { throw NoTestException(); }
		virtual void test13() { throw NoTestException(); }
		virtual void test14() { throw NoTestException(); }
		virtual void test15() { throw NoTestException(); }
		virtual void test16() { throw NoTestException(); }
		virtual void test17() { throw NoTestException(); }
		virtual void test18() { throw NoTestException(); }
		virtual void test19() { throw NoTestException(); }
		virtual void test20() { throw NoTestException(); }
		virtual void test21() { throw NoTestException(); }
	};

} // namespace jmlib

#endif
